{% load static %}
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>全球生鲜卖家管理后台</title>
    <link rel="stylesheet" href="{% static 'seller/css/font.css' %}">
    <link rel="stylesheet" href="{% static 'seller/css/xadmin.css' %}">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="{% static 'seller/lib/layui/layui.js' %}" charset="utf-8"></script>
    <script type="text/javascript" src="{% static 'seller/js/xadmin.js' %}"></script>
</head>

<body class="layui-anim layui-anim-up">
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">商品管理</a>
        <a href="/Seller/goods_add/">商品添加</a>
      </span>
</div>
<div class="x-body">
    <!-- 创建一个表格，用来显示商品的所有信息。
        自己补全属性：无
        给出属性：class="layui-table"
     -->
    <table class="layui-table">
        <thead>
        <tr>
            <th>商品序号</th>
            <th>商品编号</th>
            <th>商品名称</th>
            <th>商品原价</th>
            <th>商品现价</th>
            <th>商品库存</th>
            <th>商品销量</th>
            <th>商品浏览量</th>
            <th>商品描述</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {% for goods in goods_obj_list %}
            <tr>
                <!-- 1.需传入商品序号 -->
                <td>{{ forloop.counter }}</td>
                <!-- 2.需传入商品编号 -->
                <td>{{ goods.goods_num }}</td>
                <!-- 3.需传入商品名称 -->
                <td>{{ goods.goods_name }}</td>
                <!-- 4.需传入商品原价 -->
                <td>{{ goods.goods_oprice }}</td>
                <!-- 5.需传入商品现价 -->
                <td>{{ goods.goods_cprice }}</td>
                <!-- 6.需传入商品库存 -->
                <td>{{ goods.goods_kucun }}</td>
                <!-- 7.需传入商品销量 -->
                <td>{{ goods.goods_sales }}</td>
                <!-- 8.需传入商品浏览量 -->
                <td>{{ goods.goods_browses }}</td>
                <!-- 9.需传入商品描述 -->
                <td>{{ goods.goods_description }}</td>
                <td>
                    <!-- 10.需完善href属性 -->
                    <a href="/Seller/goods_change/?id={{ goods.id }}">编辑</a>
                    <!-- 11.需完善href属性 -->
                    <a href="/Seller/goods_delete/?id={{ goods.id }}">删除</a>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>

</div>

</body>

</html>